Contiguous File Allocation In An Extensible File System

ABSTRACT

Disclosed is a method for creating and reading a contiguous file in an extensible file system. During the creation of a file on the storage media, the file system format check the bitmap to determine if there are areas of free space on the media that would permit the storage of the file in a contiguous manner. By storing the file in a contiguous manner the file may later be read without resorting to the file allocation table, because the file itself would not be fragmented on the storage media. Once an area of free space has been identified, the file is written to the media in a contiguous manner. Further, an associated entry for the file in the directory entry is updated or created to indicate that the file is a contiguous file and also provides basic parameters necessary to read the file without resorting to accessing the file allocation table.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a divisional of U.S. patent application Ser. No.12/389,391, entitled CONTIGUOUS FILE ALLOCATION IN AN EXTENSIBLE FILESYSTEM filed Feb. 20, 2009, which: (i) claims the benefit of U.S.Provisional Application No. 61/030,043 entitled FILE ALLOCATION TABLE;(ii) is a Continuation-In-Part of U.S. application Ser. No. 11/229,485entitled EXTENSIBLE FILE SYSTEM filed Sep. 16, 2005 which claims thebenefit of U.S. Provisional Application No. 60/637,407; and (iii) isalso a Continuation-In-Part of U.S. application Ser. No. 11/752,872entitled EXTENDING CLUSTER ALLOCATIONS IN AN EXTENSIBLE FILE SYSTEMfiled May 23, 2007 which claims the benefit of U.S. ProvisionalApplication No. 60/802,922; the contents of U.S. application Ser. Nos.11/229,485, 11/752,872, 12/389,391 and U.S. Provisional Application Nos.61/030,043 are incorporated by reference herein in their entireties.

BACKGROUND

Generally described, there are a number of portable computing devices,such as digital still cameras, digital video cameras, media players,mobile phones, mobile computing devices, personal digital assistants,and the like that maintain data on a storage media, such as a portablestorage media. The continued development of more complex portablecomputing devices and larger storage capacity portable storage mediaplaces a greater demand for flexibility on the file system format usedon the storage media. Current file system format approaches can becomedeficient in that they may provide adequate flexibility for increasingstorage size capacities and/or storage media applications.

SUMMARY

An extensible file system format for portable storage media is provided.The extensible file system format includes the specification of primaryand secondary directory entry types that may be custom defined. Theprimary and secondary directory entry types can be further classified ascritical and benign directory entries.

In the confines of the extensible file system format a method forcreating and reading a file in a contiguous format is provided. Duringthe creation and/or modification of a file on the storage media, thefile system format checks the free space bitmap to determine if thereare areas of free space on the media that would permit the storage ofthe file in a contiguous manner. By storing the file in a contiguousmanner the file may later be read without resorting to the fileallocation table, because the file itself would not be fragmented on thestorage media. Once an area of free space has been identified, the fileis written to the media in a contiguous manner. Further, an associatedentry for the file in the directory entry is updated or created toindicate that the file is a contiguous file and also provides basicparameters necessary to read the file without resorting to accessing thefile allocation table.

This summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This summary is not intended to identify key features ofthe claimed subject matter, nor is it intended to be used as an aid indetermining the scope of the claimed subject matter.

DESCRIPTION OF THE DRAWINGS

The foregoing aspects and many of the attendant advantages of thisinvention will become more readily appreciated as the same become betterunderstood by reference to the following detailed description, whentaken in conjunction with the accompanying drawings, wherein:

FIGS. 1A-1C are block diagrams illustrative of an illustrativeenvironment including a portable computing device and a storage deviceimplementing the extensible file system format in accordance with anaspect of the present invention;

FIG. 2 is a block diagram illustrative of various volume layoutcomponents corresponding to an extensible file system format inaccordance with an aspect of the present invention;

FIG. 3 is a block diagram illustrative of an extensible file systemdirectory structures including primary and secondary directory entrystructures in accordance with an aspect of the present invention;

FIG. 4 is a block diagram illustrative of data components forimplementing a boot process block in an extensible file system format inaccordance with an aspect of the present invention;

FIG. 5 is a block diagram illustrative of data components forimplementing directory entries in an extensible file system format inaccordance with an aspect of the present invention

FIG. 6 is a block diagram illustrative of data components forimplementing a file name and extensions in an extensible file systemformat in accordance with an aspect of the present invention;

FIG. 7 is a block diagram illustrative of data components forimplementing a volume identifier in an extensible file system format inaccordance with an aspect of the present invention;

FIG. 8 is a block diagram illustrative of data components forimplementing an extensible directory entry in an extensible file systemformat in accordance with an aspect of the present invention;

FIG. 9 is a block diagram illustrative of data components forimplementing an extensible directory entry in an extensible file systemformat in accordance with an aspect of the present invention;

FIG. 10 is a block diagram illustrative of data components forimplementing an access control list in an extensible file system formatin accordance with an aspect of the present invention; and

FIG. 11 is a flow diagram illustrative of a file name creation routinefor an extensible file system format in accordance with an aspect of thepresent invention.

FIG. 12 is a flow diagram illustrating the creation and updating of afile as a contiguous file according to one illustrative embodiment.

FIG. 13 is a flow diagram illustrating the reading of a file when thefile is a contiguous file according to one illustrative embodiment.

FIG. 14 is a general block diagram of a computing system in whichembodiments of the present file system format may be practiced.

DETAILED DESCRIPTION

Generally described, the present invention relates to an extensible filesystem format and various processes associated with the extensible filesystem format. In an illustrative embodiment, the extensible file systemformat corresponds to an extensible file system format for portablestorage media and various processes associated with the extensible filesystem format on the portable storage media. Although the presentinvention will be described with regard to a portable storage media filesystem format, one skilled in the relevant art will appreciate that thedisclosed embodiments are illustrative in nature and should not beconstrued as limiting. Additionally, one skilled in the relevant artwill appreciate that the data structures and data layouts used in theillustrative examples may require additional information related toperformance, security, and the like.

FIGS. 1A-1C are block diagrams illustrative of various operatingenvironments 100 for the extensible file system format of the presentinvention. With reference to FIG. 1A, in an illustrative embodiment, theextensible file system format is utilized to store data from a computingdevice, such as a mobile computing device 102, and a storage media, suchas a portable storage media 104. In an illustrative embodiment, themobile computing device 102 can correspond to any one of a variety ofcomputing devices, including but not limited to, portable computingdevices, mobile telephones, personal digital assistants, music players,media players. The portable storage media can also include, but is notlimited to, hard drives, flash media, micro-drives and other storagemedia. In an illustrative embodiment, the extensible file system on theportable storage media 104 does not have to include any type ofexecutable or readable software components, such as an operatingenvironment, utilized by the mobile computing device 102. Alternatively,the extensible file system on the portable storage media 104 may includeexecutable or readable software components used by the mobile device102.

In an illustrative embodiment, the mobile computing device 102 may be incommunication with other computing devices for collecting/exchangingdata to be stored on the portable storage media 104. With reference toFIG. 1B, the mobile computing device 102 may be in direct communicationwith another computing device 106 and storage media 108. In anillustrative embodiment, the direct communication can correspond tovarious wired and wireless communication methods. In an illustrativeembodiment, the other storage media 108 is not required to be formattedin accordance with the extensible file system format of the presentinvention. With reference to FIG. 1C, in a similar manner, the mobilecomputing device 102 may also be in communication with another computingdevice 110 and storage media 112, via a network connection. In anillustrative embodiment, the network connection can correspond to localarea network (LAN) and wide area network (WAN) connections.

With reference now to FIG. 2, an illustrative embodiment volume layout200 for an extensible file system format will be described. The volumelayout 200 includes a boot parameters component 202 that include variousinformation related to a description of the file system parameters ofthe partition. In an illustrative embodiment, the boot parameterscomponent 202 can include code for bootstrapping from a definedpartition, fundamental file system parameters for the defined partition,and various error checking information. A data structure for defining atleast a portion of the boot parameters will be described below withregard to FIG. 4.

The volume layout 200 also includes an extensible parameters component,designated as OEM parameters 204, that define various additional datastructures used in conjunction with the file system. In an illustrativeembodiment, an original equipment manufacture (OEM) may specify variousextensible data structures, such as performance parameters for a storagemedium, that can be defined at time of manufacture. The volume layout200 can further include a file allocation table component 206 thatdefines file and directory allocations. In an illustrative embodiment,each entry in the file allocation table component 206 corresponds to a32 bit entry that represents an allocated cluster, an unallocatedcluster or an unusable cluster. The volume layout 200 can still furtherinclude series of file data components 208A-208X that correspond to thedata stored according to the file system format. Various data structuresfor defining a portion of the file data components 208A-208X will bedefined with regard to FIGS. 3-10.

Turning now to FIG. 3, in one aspect, the file data components 208 mayinclude one or more directory entries according to a directory structure300. In an illustrative embodiment, directory structure 300 is organizedinto primary directory entries 302 and secondary directory entries 304.Each directory entry in the primary and secondary entries is typed. Forexample, in an illustrative embodiment, type values for the primary andsecondary directory entries can correspond to a range of 1 255. Primarydirectory entries 302 correspond to the entries in the root directory ofthe file system. Secondary directory entries 304 follow a primarydirectory entry and are associated with the primary directory entry.Secondary directory entries extend the metadata associated with thecorrelated primary directory entry.

With continued reference to FIG. 3, in an illustrative embodiment, theprimary directory entries 302 can be further classified as criticalprimary directory entries 306 and benign primary directory entries 308.Critical primary directory entries 306 define potentially differentformats for each directory entry. In an illustrative embodiment, anoperating environment will not mount a volume corresponding to theextensible file system format with an unknown critical primary directoryentry, as will be described below. Examples of known primary directoryentries 306 can include allocation bitmaps, up case tables, volumelabels, encryption keys, and normal directory entries. The allocationbitmap of the exFAT volume of the present embodiments maintains a recordof the allocation states of all clusters on the storage media. This is asignificant departure from the structure of other FAT systems (e.g. FAT12, FAT 16, and FAT 32), in which a FAT maintained a record of theallocation state of all clusters in the cluster heap. Each bit in theallocation bitmap indicates whether its corresponding cluster isavailable for allocation or not. The clusters in the bitmap may berepresented from lowest to highest index. In order to keep simplicityand to enable implementations on devices with limited memory andprocessor capacity, the file directory structure has been kept unsortedand “flat”. The exFAT embodiments also enable many files (e.g., up to2,796,202) in a single directory. In order to find if a target file nameexists in a “flat” unsorted directory structure (for example, to create,open, update, or delete a file with that name), a comparison of thetarget file name can be done against the directory structure's relevant.Directory entries instead of going to the FAT table.

Benign primary directory entries 308 also define potential differentformats for each directory entry, but can be ignored by the file systemif a particular benign primary directory entry is not understood. Benignprimary directory entries 308 can be associated with another clusterchain of the volume. Additionally, benign primary directory entries 308can also be associated a number of secondary directory entries 304.

In a manner similar to primary directory entries 302, secondarydirectory entries 304 may also be further classified as criticalsecondary directory entries 310 and benign secondary directory entries312. As described above, the critical secondary directory entries 310and benign secondary directory entries 312 are associated with a benignprimary directory entry and extend the metadata associated with theprimary directory entry. Both the critical secondary directory entries310 and the benign secondary directory entries 312 can be associatedwith another cluster chain of the volume.

To mount a corresponding to the extensible file system format, the filesystem implements a mount volume procedure. In an illustrativeembodiment, the mount volume procedure attempts to a look at a versionnumber for the volume. If the version number is not understood (e.g.,the version number is higher), the volume will not be mounted. During anormal directory enumeration, any critical primary directory entries notknown by the file system will prevent the volume from being mounted.Thereafter, various user initiated processes, such as a file open, willcause the file system to enumerate the secondary directory entries. Ifthe critical secondary directory entries 310 are not known by a filesystem, the entire directory entry will be skipped. Additionally, ifbenign secondary directory entries 312 are not known by the file system,the particular unknown benign secondary directory entry will be ignored.

With reference now to FIG. 4, a block diagram illustrative of datacomponents 400 for implementing a boot process block in the bootparameters component 202 (FIG. 2) will be described. The data components400 include an OEM name component 402 for specifying a name for the filesystem format of the storage media. The data components 400 also includea data size descriptor component 404 for specifying variouscharacteristics of the data stored in the file system. For example, thedata size descriptor component 404 can specify a count of bytes persector, a number of sectors per allocation unit, a FAT table offset, anda count of sectors for all data structures. The data components includean active FAT flags component 406 for specifying a number of active FATson the file system. In an illustrative embodiment, a file system maysupport multiple FATs for utilization with some operating systemenvironments. The data components 400 can further include a volumeidentification component 408 for identifying a volume serial numberand/or version number. Still further, the data components 400 caninclude a file system type for specifying the file system format for thefile system. One skilled in the relevant art will appreciate that thedata components 400 can include a number of additional/alternative rowsfor implementing the above identified components 402 410 and additionalcomponents.

Turning now to FIG. 5, a block diagram illustrative of data components500 for implementing directory entries in an extensible file systemformat will be described. The data components 500 include an in usecomponent 502 for specifying whether the particular directory entry isin use. In an illustrative embodiment, the high bit of the datacomponents will be set to “1” if the directory entry is in use. The datacomponents 500 further include a type designation component 504 forspecifying that the directory entry is associated with a normaldirectory entry. The data components 500 further include a secondarydirectory entries component 506 for specifying a number of secondaryentries associated with the normal directory entry. The data components500 also include a file attributes component 508 for specifying variousfile system attributes for the directory entry. Still further, the datacomponents 500 include a time component 510 for specifying various timeinformation such as a creation timestamp, modification time stamp andother time information. Additionally, the data components 500 furtherinclude a time zone component 512 for specifying a time zone for thelast created time stamp. One skilled in the relevant art will appreciatethat the data components 500 can include a number ofadditional/alternative rows for implementing the above identifiedcomponents 502 512 and additional components.

Turning now to FIG. 6, a block diagram data components 600 forimplementing a file name and extensions will be described. The datacomponents 600 include an in use component 602 for specifying whetherthe particular directory entry is in use. In an illustrative embodiment,the high bit of the data components will be set to “1” if the directoryentry is in use. The data components 600 further include a typedesignation component 604 for specifying that the directory entry isassociated with a file system name. The data components further includea file name length component 606 and a file name has component 608. Theutilization of the file name hash component 608 will be described below.The data components 600 also include a file name component 610 forspecifying the file name. One skilled in the relevant art willappreciate that the data components 600 can include a number ofadditional/alternative rows for implementing the above identifiedcomponents 602 610 and additional components. Additionally, file namedirectory entries may be extended by secondary directory entries.

Turning now to FIG. 7, a block diagram illustrative of data components700 for implementing a volume identifier in an extensible file systemformat is provided. The data components 700 include an in use component702 for specifying whether the particular directory entry is in use. Inan illustrative embodiment, the high bit of the data components will beset to “1” if the directory entry is in use. The data components 700further include a type designation component 704 for specifying that thedirectory entry is associated with a volume identifier. The datacomponents 700 further include a secondary directory entries component706 for specifying a number of secondary entries associated with thevolume identifier. The data components 700 also include a volumeidentifier 708, such as a global unique identifier. One skilled in therelevant art will appreciate that the data components 700 can include anumber of additional/alternative rows for implementing the aboveidentified components 702-708 and additional components. Additionally,in an illustrative embodiment, the data components 700 correspond to abenign directory entry that can be ignored by a file system that doesnot support volume identifiers.

With reference now to FIGS. 8 and 9, in an illustrative embodiment,parties, such as an OEM, may be able to define specific benign primarydirectory entry types 308 and benign secondary directory entry types312. As discussed above, in the event the file system would notrecognize or understand either the specific benign primary directoryentry types 308 or benign secondary directory entry types 312, the filesystem could ignore the defined directory entry types.

With reference to FIG. 8, a block diagram illustrative of datacomponents 800 for implementing an extensible benign primary directoryentry 308 in an extensible file system format will be described. Thedata components 800 include an in use component 802 for specifyingwhether the particular directory entry is in use. In an illustrativeembodiment, the high bit of the data components will be set to “1” ifthe directory entry is in use. The data components 800 further include atype designation component 804 for specifying that the directory entryis a benign primary directory entry. The data components 800 furtherinclude a secondary directory entries component 806 for specifying anumber of secondary entries associated with the volume identifier. Thedata components 800 also include a volume identifier 808, such as aglobal unique identifier. The data components 800 can further include aflag component 810 that corresponds to an indication of whethercontiguous allocation of a cluster chain is to be implemented. The datacomponents 800 can further include additional information 812, such asverification information and a starting cluster. As will be explained ingreater detail below, cluster chains utilizing contiguous allocation canbe defined according to cluster chain size and a starting cluster forthe first cluster in the chain. One skilled in the relevant art willappreciate that the data components 800 can include a number ofadditional/alternative rows for implementing the above identifiedcomponents 802-812 and additional components.

With reference to FIG. 9, a block diagram illustrative of datacomponents 900 for implementing a benign secondary directory entry in anextensible file system format will be described. The data components 900include an in use component 902 for specifying whether the particulardirectory entry is in use. In an illustrative embodiment, the high bitof the data components will be set to “1” if the directory entry is inuse. The data components 900 further include a type designationcomponent 904 for specifying that the directory entry is a benignprimary directory entry. The data components 900 further include asecondary directory entries component 906 for specifying a number ofsecondary entries associated with the volume identifier. The datacomponents 900 also include a volume identifier 908, such as a globalunique identifier. The data components 900 can further include a flagcomponent 910 that corresponds to an indication of whether contiguousallocation of a cluster chain is to be implemented. The data components900 can further include additional information 912, such as verificationinformation and a starting cluster. One skilled in the relevant art willappreciate that the data components 900 can include a number ofadditional/alternative rows for implementing the above identifiedcomponents 902-912 and additional components.

In an illustrative embodiment, a benign primary directory entry and/orsecondary directory entries may be associated with access control list(ACL) information. FIG. 10 is a block diagram illustrative of datacomponents 1000 for implementing an access control list in an extensiblefile system format. The data components 1000 include an in use component1002 for specifying whether the particular directory entry is in use. Inan illustrative embodiment, the high bit of the data components will beset to “1” if the directory entry is in use. The data components 1000further include a type designation component 1004 for specifying thatthe directory entry is an ACL directory entry. The data components 1000further include a number of ACL fields 1006, such as ACL flags, pointersto ACL databases, and the like. One skilled in the relevant art willappreciate that the data components 1000 can include a number ofadditional/alternative rows for implementing the above identifiedcomponents 1002 1006 and additional components.

With reference now to FIG. 11, a file name creation routine 1100 for anextensible file system format will be described. At block 1102, a filesystem obtains a request to create a directory entry with a specificfile name. In an illustrative embodiment, the specific file name cancorrespond to a naming convention, such as a digital camera picturenaming convention. At block 1104, the file system generates a targetname hash. At block 1106, an iterative loop is begun by examining thenext directory entry hash value. An illustrative directory entry typefor storing directory entry hash values is described above with regardto data components 600 (FIG. 6).

At decision block 1108, a test is conducted to determine whether thetarget hash value matches the current directory entry hash value. Ifthey do not match, the routine 1100 returns to block 1106 (until all thedirectory entries have been examined. If the hash values match atdecision block 1108, at block 1110, the file system obtains the fullfile name for the potentially matching directory entry. An illustrativedirectory entry type for storing directory entry full file names isdescribed above with regard to data components 600 (FIG. 6). At decisionblock 1112, a test is conducted to determine whether the target filename matches the full file name of the potentially matching directoryentry. If so, the routine 1100 terminates by reporting a conflict andthe file system will be required to select a new file name. If the fullfile does not match, the routine 1100 will return to block 1106 tocontinue checking hash values for all the directory entries in the filesystem.

In accordance with an aspect of the present invention, variousadditional functionality may be added through the specification ofspecific directory types. For example, name streams may be supported byspecifying a name stream directory entry. Additionally, on diskencryption may also be supported through the utilization of specificencryption algorithms and key exchanges. Still further, time zoneconversions may be associated with directory entries to automaticallyconvert a current time zone with a time zone with the directory entrywas made.

FIG. 12 is a flow diagram illustrating a process for creating orallocating a file as a contiguous file in the extensible file systemformat, according to at least one embodiment. Contiguous files are filesthat are stored on the storage media in such a manner that they are notfragmented by clusters in between clusters that store the data for thefile. The process of FIG. 12 will be discussed in general terms and isapplicable to any type of file that may be stored on the storage media.

To start the creation process, data associated with the file to bestored is received at the storage media. This file data can be any typeof file and may have originated at any source. For example, the data maybe a document, a photograph, a music file, a media file, or any othertype of data file that may be stored. Further, the file may haveoriginated or been generated at a personal computer, a camera, a digitalmedia player, or any other consumer electronics device. The receipt ofthis data is illustrated at step 1210.

Once the data has been received at the storage media, the amount ofspace needed to store the file is determined This is illustrated at step1220. Depending on the configuration of the storage media and the deviceproviding the data, the determined amount of space may be described asin the number of clusters needed or the actual size in bytes of thefile. The process of FIG. 12 also scans the bitmap associated with thestorage media to identify free space on the storage media. This isillustrated at 1230. The free space on the storage media is unused spacethat the storage media has allocated for storage of files and otherdata.

Once the available free space on the storage media has been identified,the process of FIG. 12 determines if there is a section or area of freespace on the storage media that is the same size or is larger than thesize of the file to be stored. For example, that is large enough tocontain the entire file to be stored. This identification of the size ofthe free space is used to determine if the file can be stored as acontiguous file. The identification of the free space is illustrated at1240.

If there is an area of free space on the storage media that is the samesize or larger than the size of the file, then the file is written tothe storage media as a contiguous file. This is illustrated at 1250. Incontrast to typical methods of writing a file to a storage media, theprocess of writing a contiguous file avoids writing any information tothe File Allocation Table. At step 1250, an entry in the directory entryfor the file is created and the file size (either in bytes or clusters)and starting cluster are placed in the directory entry for the file. Thedirectory entry can be either the primary or secondary directory entrydiscussed earlier. Additionally, a bit in the directory entry is set toindicate that the file is a contiguous file. This information stored inthe directory entry allows for faster reading of the file and will bediscussed in greater detail with respect to FIG. 13. When enough freespace cannot be found at step 1240, then the file is written to thestorage media as a fragmented file using the File Allocation Table, asshown at step 1260.

The process of FIG. 12 can also be used when the file has previouslybeen stored on the storage media. In this embodiment the stored file isupdated by a device that is configured to modify the file. Themodification of the file can either cause the file to become larger,such as when a user adds data to the file, or become smaller, such aswhen the user removes data or compresses the file. Depending on thenature of the update (enlarging or shrinking the size of the file)slightly different processes are performed at the steps of FIG. 12.

In the situation where the file is updated to be a larger file theprocess of FIG. 12 first determines if there is enough free space leftin the area of free space where the file is currently stored, to writethe updated file. If there is enough free space in the area of freespace contiguous to the previous allocation, the updated file is simplywritten to this area of free space. At this time the directory entry forthe file is updated to reflect the change in the number of clusters andsize of the file. If the area of free space is not large enough to storethe updated file, the process of FIG. 12, in some embodiments, repeatsstep 1240 to attempt to identify if there is another area of free spacethat is large enough to write the updated file as a contiguous file. Ifanother area of free space that is large enough for the updated file isidentified, the updated file is written to the storage media in theother area of free space and the associated entries in the directoryentry are updated.

However, when another sufficiently large area of free space cannot belocated on the storage media, the file is stored on the storage media asany other non-contiguous file would be stored, as shown by step 1260.That is, the file is fragmented such that part of the file is stored ina first set of clusters and another part of the file is stored in asecond set of clusters that is not contiguous with the first set.Further, the directory entry for the file is modified by deselecting thecontiguous file bit so that the file is no longer indicated as beingcontiguous. As the file is written in a non-contiguous manner, the FileAllocation Table is updated to include the information necessary toretrieve the file from the storage media.

In the situation where the updated file is smaller than the originalfile the process of FIG. 12 determines if the file is already acontiguous file. If the file is already contiguous the updated file iswritten in the current location and the associated entry in thedirectory entry is updated to reflect the new size of the file. However,if the original file is not a contiguous file, the process determineswhether the updated file can be written in a contiguous manner. Theprocess for determining if the file is to be written in a contiguousmanner is executed according to steps 1210-1250 discussed above.However, at step 1240, the process considers the space currentlyoccupied by the file as being free space.

FIG. 13 is a flow diagram illustrating a process for reading acontiguous file in the extensible file system format from the storagemedia, according to at least one embodiment. The process of FIG. 13begins when the storage media receives an indication of the file that isto be read from the storage media. For example the indication can be thename of the file. This is illustrated at 1310. Next the process of FIG.13 identifies an entry in the directory entry for the indicated file.This is illustrated at 1320. Once an entry in the directory entry islocated, the process then determines if the file is a contiguous file.This is illustrated at 1330. If the entry is not identified ascontiguous the process reads the file in a conventional manner using theFAT table, as shown at step 1350. In one embodiment the processdetermines if a contiguous file flag or bit is set in the directoryentry for the file. If the file is determined to be a contiguous filethe file is read from the storage media without accessing the FileAllocation Table. This is illustrated at 1340. In one embodiment theprocess reads the file without using the File Allocation Table, byobtaining the starting cluster location for the file from the directoryentry. The process also determines the number of clusters used by thefile from the directory entry. If the entry for the filed does notcontain the number of clusters, the process can calculate the number ofclusters by dividing the file size obtained from the directory entry bya known cluster size for the storage media. Then the process obtains theentire file by reading from the bitmap from the starting cluster thatnumber of clusters indicated by the directory entry.

FIG. 14 illustrates an example of a suitable computing systemenvironment 1400 on which the extensible file system format of thepresent discussion may be implemented. The computing system environment1400 is only one example of a suitable computing environment and is notintended to suggest any limitation as to the scope of use orfunctionality. Neither should the computing environment 1400 beinterpreted as having any dependency or requirement relating to any oneor combination of components illustrated in the exemplary operatingenvironment 1400.

The extensible file system format is operational with numerous othergeneral purpose or special purpose computing system environments orconfigurations. Examples of well-known computing systems, environments,and/or configurations that may be suitable for use with the extensiblefile system format include, but are not limited to, personal computers,server computers, hand-held or laptop devices (such as mobile phones,media players, etc.), multiprocessor systems, microprocessor-basedsystems, set top boxes, media kiosks, consumer electronics (such astelevisions, optical disk players, digital picture frames, etc.),network PCs, minicomputers, mainframe computers, telephony systems,distributed computing environments that include any of the above systemsor devices, and the like.

With reference to FIG. 14, an exemplary system for implementing theextensible file system format includes a general-purpose computingdevice in the form of a computer 1410. Components of computer 1410 mayinclude, but are not limited to, a processing unit 1420, a system memory1430, and a system bus 1421 that couples various system componentsincluding the system memory to the processing unit 1420. The system bus1421 may be any of several types of bus structures including a memorybus or memory controller, a peripheral bus, and a local bus using any ofa variety of bus architectures. By way of example, and not limitation,such architectures include Industry Standard Architecture (ISA) bus,Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, VideoElectronics Standards Association (VESA) local bus, and PeripheralComponent Interconnect (PCI) bus also known as Mezzanine bus.

Computer 1410 typically includes a variety of computer readable media.Computer readable media can be any available media that can be accessedby computer 1410 and includes both volatile and nonvolatile media,removable and non-removable media. By way of example, and notlimitation, computer readable media may comprise computer storage mediaand communication media. Computer readable storage media includes bothvolatile and nonvolatile, removable and non-removable media implementedin any method or technology for storage of information such as computerreadable instructions, data structures, program modules or other data.Computer storage media includes, but is not limited to, RAM, ROM,EEPROM, flash memory or other memory technology, CD-ROM, digitalversatile disks (DVD) or other optical disk storage, magnetic cassettes,magnetic tape, magnetic disk storage or other magnetic storage devices,or any other medium which can be used to store the desired informationand which can be accessed by computer 1410. Combinations of any of theabove should also be included within the scope of computer readablemedia.

The system memory 1430 includes computer storage media in the form ofvolatile and/or nonvolatile memory such as read only memory (ROM) 1431and random access memory (RAM) 1432. A basic input/output system 1433(BIOS), containing the basic routines that help to transfer informationbetween elements within computer 1410, such as during start-up, istypically stored in ROM 1431. RAM 1432 typically contains data and/orprogram modules that are immediately accessible to and/or presentlybeing operated on by processing unit 1420. By way of example, and notlimitation, FIG. 14 illustrates operating system 1434, applicationprograms 1435, other program modules 1436, and program data 1437.

The computer 1410 may also include other removable/non-removablevolatile/nonvolatile computer storage media. By way of example only,FIG. 14 illustrates a hard disk drive 1441 that reads from or writes tonon-removable, nonvolatile magnetic media, a magnetic disk drive 1451that reads from or writes to a removable, nonvolatile magnetic disk1452, and an optical disk drive 1455 that reads from or writes to aremovable, nonvolatile optical disk 1456 such as a CD ROM or otheroptical media. Other removable/non-removable, volatile/nonvolatilecomputer storage media that can be used in the exemplary operatingenvironment include, but are not limited to, magnetic tape cassettes,flash memory cards, digital versatile disks, digital video tape, solidstate RAM, solid state ROM, and the like. The hard disk drive 1441 istypically connected to the system bus 1421 through a non-removablememory interface such as interface 1440, and magnetic disk drive 1451and optical disk drive 1455 are typically connected to the system bus1421 by a removable memory interface, such as interface 1450.

The drives and their associated computer storage media discussed aboveand illustrated in FIG. 14, provide storage of computer readableinstructions, data structures, program modules and other data for thecomputer 1410. In FIG. 14, for example, hard disk drive 1441 isillustrated as storing operating system 1444, application programs 1445,other program modules 1446, and program data 1447. Note that thesecomponents can either be the same as or different from operating system1434, application programs 1435, other program modules 1436, and programdata 1437. Operating system 1444, application programs 1445, otherprogram modules 1446, and program data 1447 are given different numbershere to illustrate that, at a minimum, they are different copies. Insome embodiments, at least a portion of processes described above may beimplemented by computer readable instructions executable by one or morecomputing devices.

A user may enter commands and information into the computer 1410 throughinput devices such as a keyboard 1462, a microphone 1463, and a pointingdevice 1461, such as a mouse, trackball or touch pad. Other inputdevices (not shown) may include a joystick, game pad, satellite dish,scanner, or the like. These and other input devices are often connectedto the processing unit 1420 through a user input interface 1460 that iscoupled to the system bus, but may be connected by other interface andbus structures, such as a parallel port, game port or a universal serialbus (USB). A monitor 1491 or other type of display device is alsoconnected to the system bus 1421 via an interface, such as a videointerface 1490. In addition to the monitor, computers may also includeother peripheral output devices such as speakers 1497 and printer 1496,which may be connected through an output peripheral interface 1490.

The computer 1410 may operate in a networked environment using logicalconnections to one or more remote computers, such as a remote computer1480. The remote computer 1480 may be a personal computer, a hand-helddevice, a server, a router, a network PC, a peer device or other commonnetwork node, and typically includes many or all of the elementsdescribed above relative to the computer 1410. The logical connectionsdepicted in FIG. 14 include a local area network (LAN) 1471 and a widearea network (WAN) 1473, but may also include other networks. Suchnetworking environments are commonplace in offices, enterprise-widecomputer networks, intranets and the Internet.

When used in a LAN networking environment, the computer 1410 isconnected to the LAN 1471 through a network interface or adapter 1470.When used in a WAN networking environment, the computer 1410 typicallyincludes a modem 1472 or other means for establishing communicationsover the WAN 1473, such as the Internet. The modem 1472, which may beinternal or external, may be connected to the system bus 1421 via theuser input interface 1460, or other appropriate mechanism. In anetworked environment, program modules depicted relative to the computer1410, or portions thereof, may be stored in the remote memory storagedevice. By way of example, and not limitation, FIG. 14 illustratesremote application programs 1485 as residing on remote computer 1480. Itwill be appreciated that the network connections shown are exemplary andother means of establishing a communications link between the computersmay be used.

While illustrative embodiments have been illustrated and described, itwill be appreciated that various changes can be made therein withoutdeparting from the spirit and scope of the invention.

What is claimed is:
 1. A method of writing a file to a storage mediacomprising: receiving data associated with the file to be written;determining an amount of space associated with the file when the file iswritten to the storage media; reading a bitmap associated with thestorage media to identify areas of free space on the media; identifyingfrom the areas of free space on the storage media free space equal to orgreater than the space associated with the file; writing the file to thestorage media as a contiguous file when an area of free space on themedia is greater than or equal to the space associated with the file isidentified; and setting a contiguous file flag for the entry associatedwith the file in a directory entry, when the file is written as acontiguous file.
 2. The method of claim 1 wherein writing the file tothe storage media, further comprises: setting a file size entry for anentry associated with the file in a directory entry of the storagemedia, the directory entry being separate from a file allocation table;and setting a starting cluster indication entry for the entry associatedwith the file in the directory entry.
 3. The method of claim 1 whereinwhen the file is written to the storage media as a contiguous file, afile allocation table for the storage media is not updated.
 4. Themethod of claim 1 wherein receiving data associated with the filereceives data indicative of an update to a file that is storedpreviously on the storage media, the method further comprising:determining if there is enough free space in the area of free space forthe updated file; writing the updated file in the area of free spacewhen there is enough free space; when there is not enough free space inthe area of free space for the updated file, reading the bitmap toidentify if there is another area of free space on the storage mediathat has free space that is greater than or equal to the spaceassociated with the updated file; writing the updated file to theanother area of free space when the another area of free space isidentified as having free space greater than or equal to the spaceassociated with the updated file; and when there is not another area offree space on the storage media, writing the updated file to the storagemedia in a non-contiguous manner; deselecting the contiguous file flagin the directory entry for the file; and updating the file allocationtable.
 5. The method of claim 1 wherein receiving data associated withthe file receives data indicative of an update to a file that is storedpreviously on the storage media in a non-contiguous manner, the methodfurther comprising: determining that the amount of space associated withthe updated file is smaller than an amount of space currently occupiedby the file on the storage media; searching the bitmap to identify freespace that is greater than the amount of space associated with theupdated file; deleting the file from the storage media and writing theupdated file to the identified free space when the updated file can bewritten in a contiguous manner; and updating the entries in thedirectory entry associated with the file to indicate that the file isnow contiguous.
 6. The method of claim 1 wherein the received dataassociated with the file to be written is received from a consumerelectronics device.
 7. A computing device having storage that storescomputer-executable instructions and a processor for executing theinstructions, the instructions, when executed by the processor, causingthe device to perform operations comprising: receiving data associatedwith a file to be written to a storage media; determining an amount ofspace associated with the file when the file is written to the storagemedia; reading a bitmap associated with the storage media to identifyareas of free space on the media; identifying from the areas of freespace on the storage media free space equal to or greater than the spaceassociated with the file; writing the file to the storage media as acontiguous file when an area of free space on the media is greater thanor equal to the space associated with the file is identified; andsetting a contiguous file flag for the entry associated with the file ina directory entry, when the file is written as a contiguous file.
 8. Thecomputing device of claim 7 wherein the operation of writing the file tothe storage media, further comprises: setting a file size entry for anentry associated with the file in a directory entry of the storagemedia, the directory entry being separate from a file allocation table;and setting a starting cluster indication entry for the entry associatedwith the file in the directory entry.
 9. The computing device of claim 7wherein when the file is written to the storage media as a contiguousfile, a file allocation table for the storage media is not updated. 10.The computing device of claim 7 wherein receiving data associated withthe file receives data indicative of an update to a file that is storedpreviously on the storage media, and wherein the operations furthercomprise: determining if there is enough free space in the area of freespace for the updated file; writing the updated file in the area of freespace when there is enough free space; when there is not enough freespace in the area of free space for the updated file, reading the bitmapto identify if there is another area of free space on the storage mediathat has free space that is greater than or equal to the spaceassociated with the updated file; writing the updated file to theanother area of free space when the another area of free space isidentified as having free space greater than or equal to the spaceassociated with the updated file; and when there is not another area offree space on the storage media, writing the updated file to the storagemedia in a non-contiguous manner; deselecting the contiguous file flagin the directory entry for the file; and updating the file allocationtable.
 11. The computing device of claim 7 wherein receiving dataassociated with the file receives data indicative of an update to a filethat is stored previously on the storage media in a non-contiguousmanner, and wherein the operations further comprise: determining thatthe amount of space associated with the updated file is smaller than anamount of space currently occupied by the file on the storage media;searching the bitmap to identify free space that is greater than theamount of space associated with the updated file; deleting the file fromthe storage media and writing the updated file to the identified freespace when the updated file can be written in a contiguous manner; andupdating the entries in the directory entry associated with the file toindicate that the file is now contiguous.
 12. The computing device ofclaim 7 wherein the received data associated with the file to be writtenis received from a consumer electronics device.